package com.hm.recycle.util;

/**
 * @author shishun.wang
 * @date 下午5:29:37 2016年6月23日
 * @version 1.0
 * @describe
 */
public interface RecycleConfigDef {

	public interface Db {

		public interface Mongo {

			public String PREFIX = "hm_base_";

		}

		public interface Elasticsearch {

			public String PREFIX = "hm_es_base_";

			public interface Index {

				public static String BASE_DEFAULT_INDEX = "hm_es_ibsm_base_index";
			}
		}
	}

	public interface Api {

		public String API_PREFIX = RecycleConfigDef.Api.Rest.REST;

		public interface Rest {

			public String REST = "rest";
			
			public String VERSION = REST+"/v1";

			public interface Recycle {

				public String REST_RECYCLE = VERSION + "/recycle";

				public String REST_RECYCLE_UPDATE = REST_RECYCLE + "/update";

				public String REST_RECYCLE_NEW = REST_RECYCLE + "/new";

				public String REST_RECYCLE_DELETE = REST_RECYCLE + "/delete";

			}
		}
	}

	public enum OperationRecord {

		/**
		 * 标准新增
		 */
		STANDARD_NEW,

		/**
		 * 标准修改
		 */
		STANDARD_UPDATE,

		/**
		 * 标准删除
		 */
		STANDARD_DELETE;
	}

	public interface BaseInit {

		public interface SessionOrCookieToken {

			public String SESSION_TOKEN_KEY = "CUSTOMER_TOKEN";

			public String CLIENT_COOKIE_JSESSION_ID = "JSESSIONID";

			public String LGOIN_SUCCESSFUL = "LGOIN_SUCCESSFUL";

			public String REQUEST_TOKEN = "TOKEN";
		}

	}

	/**
	 * @author shishun.wang
	 * @date 2016年5月25日 下午10:48:35
	 * @version 1.0
	 * @describe 响应状态码
	 */
	public interface ResponseState {
		/**
		 * 会话超时
		 */
		public int SESSION_TIMEOUT = 10000;
		/**
		 * 被其他用户挤下线
		 */
		public int HAS_CROWDED_OFFLINE = 10001;

		/**
		 * 请求Token失效或已经过期
		 */
		public int REQUEST_TOKEN_LOSE = 10002;
	}
}
